*********************************************************************************************************************************************************************
* This Stata do-file contains code that generates all tables in "Shareholder-Creditor Conflict and the Resolution of Financial Distress"
* As several datasets used in the analysis are proprietary and cannot be shared, this code is only given to help reserachers to understand the set up of our databases and main variables.
* For data copyright issues, variable firm_id is a pseudo firm identifier. 

* There are 12 required data input files (XXX.dta)
	* "dualholding_BA.dta" is a 30% random sample of our main dataset of dual holdings (using backward tracking coverage) of the sample of distressed firms
	* "dualholding_TA.dta" is a 30% random sample of dual holdings using total coverage of the sample of distressed firms
	* "dualholding_BA_lead.dta" is a 30% random sample of dual holdings by lead lenders only of the sample of distressed firms
	* "dualholding_MA.dta" is a 50% random sample of dual holdings matched with M&A of the holders for the sample of distressed firms
	* "selfrecovery.dta" is a 30% random sample of the distressed fimr-year data
	
	* "basectrls.dta" provides data on the main set of control variables in all the regressions
	* "amihud" provides data on the amihud measures for the IV regressions
	* "asset_redeploy_2015" provides data on assest redeployability at industry (naics4) level
	* "capiq.dta" provides data on capital structure from CapitalIQ
	* "holdout.dta" provides data on lender structure from DealScan
	* "PeterTaylorQ.dta" provides data on intangible assets from Peter and Taylor (2016)
	* "post_resolution.dta" provides data on firm's performance and refiling following resolution of the distress events
	 

	
* This program was run without errors in Stata 16.0. 
* Authors: Yongqiang Chu, Ha Diep-Nguyen, Jun Wang, Wei Wang, and Wenyu Wang
* Date Modified: Mar 2024
**********************************************************************************************************************************************************************


  clear all
  set more off
  global dualhold "...."  // Set the working directory. Store data files in this directory.
  cd "$dualhold"

	** Install the following packages if not yet installed
	*ssc install egenmore
	*ssc install ftools
	*ssc install regdhfe
	*ssc install egenmore


********************************************************************************
*Construct dualholding variables
********************************************************************************

	use dualholding_BA, clear

	gen dummy_le = 1 if le_dual_loan_BA !=0 & total_loan!=0   //Loan-Equity Dummy
	replace dummy_le = 0 if le_dual_loan_BA ==0


	gen dintensity_le = le_dual_loan_BA/total_loan    // Debt intensity for Loan - Equity dual holdings
	replace dintensity_le=0 if dintensity_le==.
	gen cond_dintensity_le = le_dual_loan_BA/total_loan  // Conditional Debt intensity for Loan - Equity dual holdings


	gen eintensity_le = le_dual_equity_BA/total_equity  // Equity intensity for Loan - Equity dual holdings
	replace eintensity_le = 0 if eintensity_le ==.
	gen cond_eintensity_le = le_dual_equity_BA/total_equity // Conditional Equity intensity for Loan - Equity dual holdings


	gen combo_le = dintensity_le*eintensity_le  //Debt intensity x Equity intensity
	gen cond_combo_le = cond_dintensity_le*cond_eintensity_le  //Debt intensity x Equity intensity



	la var dummy_le "Dummy LE"
	la var cond_dintensity_le "Debt Intensity LE" 
	la var dintensity_le "Debt Intensity LE" 
	la var cond_eintensity_le "Equity Intensity LE"
	la var eintensity_le "Equity Intensity LE" 
	la var cond_combo_le "Combo Intensity LE"
	la var combo_le "Combo Intensity LE"
	
	
	gen dummy_be = 1 if be_dual_bond_BA !=0 & total_bond!=0   //Bond-Equity Dummy
	replace dummy_be = 0 if be_dual_bond_BA ==0

	gen dintensity_be = be_dual_bond_BA/total_bond    // Debt intensity for bond - Equity dual holdings
	replace dintensity_be=0 if dintensity_be==.
	gen cond_dintensity_be = be_dual_bond_BA/total_bond  // Conditional Debt intensity for bond - Equity dual holdings

	gen eintensity_be = be_dual_equity_BA/total_equity  // Equity intensity for bond - Equity dual holdings
	replace eintensity_be = 0 if eintensity_be ==.
	gen cond_eintensity_be = be_dual_equity_BA/total_equity // Conditional Equity intensity for bond - Equity dual holdings

	gen combo_be = dintensity_be*eintensity_be  //Debt intensity x Equity intensity
	gen cond_combo_be = cond_dintensity_be*cond_eintensity_be  //Debt intensity x Equity intensity

	la var dummy_be "Dummy BE"
	la var cond_dintensity_be "Debt Intensity BE" 
	la var dintensity_be "Debt Intensity BE" 
	la var cond_eintensity_be "Equity Intensity BE"
	la var eintensity_be "Equity Intensity BE" 
	la var cond_combo_be "Combo Intensity BE"
	la var combo_be "Combo Intensity BE"



********************************************************************************
*Merge control variables
********************************************************************************
	merge 1:1 firm_id quar using "basectrls.dta"
	drop if _m!=3
	drop _m

	save merged_BA, replace




********************************************************************************
*Set controls
********************************************************************************
	global control1 = "size cash cflow tang rd rd_missing blev ds_score frac_loans mi_frac_loans "
	global control2 = "pension lease nol union_rate cds"
	global control3 = "nonCLO private traditional"
	global sumstat = "size cash cflow tang rd rd_missing blev pension lease nol union_rate cds ds_score frac_loans mi_frac_loans nonCLO private traditional dummy_le cond_eintensity_le cond_dintensity_le dummy_be cond_eintensity_be cond_dintensity_be"
	global FEs = "sic2 year"
	global controlds = "size cash cflow tang rd rd_missing blev frac_loans mi_frac_loans"


********************************************************************************
*** Table 1 - Summary Statistics
********************************************************************************
	use merged_BA, clear

	estpost sum $sumstat, d
	esttab using "Table1_summary.csv", cells((obs mean(fmt(%5.3f)) sd(fmt(%5.3f)) p1(fmt(%5.3f)) p25(fmt(%5.3f)) p50(fmt(%5.3f)) p75(fmt(%5.3f)) p99(fmt(%5.3f)) )) label replace 
		
		
		
		
********************************************************************************
*** Table 2 - Out-of-Court vs. Bankruptcy Comparison
********************************************************************************
	use merged_BA, clear

	estpost sum $sumstat if out1==1
	est sto A
	estpost sum $sumstat if out1==0
	est sto B
	esttab A B using "Table2_comparison.csv", replace cells("mean(fmt(%9.3f) label(Mean)) sd(fmt(%9.3f) label(SD))") label 

	*t-test
	estpost ttest $sumstat, by(out1)
	est sto tab2
	esttab tab2 using "Table2_ttest.csv", replace mtitle("Difference" "t-stat") modelwidth(5) label wide




********************************************************************************
*** Table 3 - Baseline Result
********************************************************************************
	use merged_BA, clear

	quietly reghdfe out1 dummy_le $control1, a(${FEs}) cluster (sic2)
	est sto ols1

	quietly reghdfe out1 dummy_le $control1 $control2, a(${FEs}) cluster (sic2)
	est sto ols2

	quietly reghdfe out1 dummy_le $control1 $control2 $control3, a(${FEs}) cluster (sic2)
	est sto ols3

	quietly probit out1 dummy_le $control1, vce(cl sic2)
	estpost margins, dydx(*)
	est sto probit1

	quietly probit out1 dummy_le $control1 $control2, vce(cl sic2)
	estpost margins, dydx(*)
	est sto probit2

	quietly probit out1 dummy_le $control1 $control2 $control3, vce(cl sic2)
	estpost margins, dydx(*)
	est sto probit3

	esttab ols1 ols2 ols3 probit1 probit2 probit3 using "Table3_baseline.csv", replace label b(%9.3f) t(%9.2f) r2(%9.2f) pr2(%9.2f) modelwidth(6) mtitles (OLS OLS OLS Probit Probit Probit) star(* 0.10 ** 0.05 *** 0.01)				



********************************************************************************
*** Table 4 - Debt and Equity Intensity
********************************************************************************
	use merged_BA, clear

	foreach v in dintensity_le cond_dintensity_le eintensity_le cond_eintensity_le combo_le cond_combo_le{ 
		quietly reghdfe out1 `v'  $control1, a(${FEs}) cluster (sic2)
		est sto `v'
	}

	esttab dintensity_le cond_dintensity_le eintensity_le cond_eintensity_le combo_le cond_combo_le using "Table4_Intensity.csv", replace label b(%9.3f) t(%9.2f) r2(%9.2f) modelwidth(6) star(* 0.10 ** 0.05 *** 0.01)



********************************************************************************
*** Table 5 - Conflict of Interest
********************************************************************************
	use merged_BA, clear


*** Panel A: Collateralization
******************************
	merge 1:1 firm_id fyear using "capiq.dta", keepusing(tsecure_capiq tloan_capiq)
	drop if _m==2
	drop _m
	

	gen ppeat = ppent + act
	gen mva = at*mtb


	foreach v in tsecure_capiq tloan_capiq{
			foreach a in ppeat at mva {
				gen col`v'`a' = `v'/(`a'*1000000)	
				replace col`v'`a' = 0 if col`v'`a'==.
				egen hicol`v'`a' = xtile(col`v'`a'), nq(2)
				replace hicol`v'`a' = 2-hicol`v'`a'
				quietly reghdfe out1 dummy_le##hicol`v'`a' $control1, a(${FEs}) cluster (sic2)
				est sto col`v'`a'
			}
	}

	esttab coltsecure_capiqppeat coltsecure_capiqat coltsecure_capiqmva coltloan_capiqppeat coltloan_capiqat coltloan_capiqmva using "Table5A_Collateralization.csv", replace label b(%9.3f) t(%9.2f) r2(%9.2f) modelwidth(6) star(* 0.10 ** 0.05 *** 0.01) 


*** Panel B: Level of secured loans
***********************************
	egen s_rank = xtile(fsecure_le) if dummy_le!=0, nq(2) 
	gen hisec=1 if s_rank==2
	replace hisec=0 if hisec==.

	gen lowsec=1 if s_rank==1
	replace lowsec=0 if lowsec==.

	quietly reghdfe out1 hisec lowsec $control1, a(${FEs}) cluster (sic2)
	lincom _b[hisec] - _b[lowsec]
	est sto srank

	esttab srank using "Table5B_Secured.csv", replace label b(%9.3f) t(%9.2f) r2(%9.2f) modelwidth(6) star(* 0.10 ** 0.05 *** 0.01) 


****Panel C : Holdout problem
*****************************
	merge 1:1 firm_id quar using "holdout.dta"
	drop if _m==2
	drop _m
	


	foreach v in tnumlender lenderhhi anumlender loanhhi{
		egen hi`v' = xtile(`v'), nq(2)
		replace hi`v' = hi`v' - 1
	}


	foreach v in lenderhhi loanhhi{  
		replace hi`v' = 2 - hi`v'
	}       
	//low hhi (low concentration) indicate high level of holdout


	foreach v in tnumlender lenderhhi anumlender loanhhi{
		quietly reghdfe out1 dummy_le##hi`v' $control1, a(${FEs}) cluster (sic2)
	est sto `v'
	}

	esttab tnumlender lenderhhi anumlender loanhhi using "Table5C_Holdout.csv", replace label b(%9.3f) t(%9.2f) r2(%9.2f) modelwidth(6) star(* 0.10 ** 0.05 *** 0.01) 



********************************************************************************
*** Table 6 - Bankruptcy Costs
********************************************************************************
	use merged_BA, clear

	sort naics4 fyear
	merge m:1 naics4 fyear using "asset_redeploy_2015.dta"
	drop if _m==2
	drop _m
	rename asset_redeploy astspec


	merge 1:1 firm_id fyear using "PeterTaylorQ.dta", keepusing(k_int)
	drop if _m==2
	drop _m

	

	foreach v in k_int astspec{
		egen hi`v' = xtile(`v'), nq(2)
		replace hi`v' = hi`v' - 1	
	}

	foreach v in nol lease{
		egen hi`v' = xtile(`v'), nq(2)
		replace hi`v' = 2 - hi`v'
	}

	foreach v in k_int astspec nol lease  {
		quietly reghdfe out1 dummy_le##hi`v' $control1, a(${FEs}) cluster (sic2)
		est sto `v'
	}

	gen post2005 = 1 if year>2005
	replace post2005 = 0 if post2005==.

	quietly reghdfe out1 dummy_le##post2005 $control1, a(sic2) cluster (sic2)
	est sto post2005

	esttab k_int astspec post2005 nol lease using "Table6_BKCost.csv", replace label b(%9.3f) t(%9.2f) r2(%9.2f) mtitles("Asset Intangibility" "Asset Specificity" "Post 2005" "NOL" "Lease" ) modelwidth(6) star(* 0.10 ** 0.05 *** 0.01)


********************************************************************************
*** Table 7 - Addressing Endogeneity
********************************************************************************

*** Panel A : MA - induced
***************************
	use dualholding_MA, clear
		
	gen MAdummy = .
	replace MAdummy = 1 if (holdertype==4 | holdertype==6) & MA_chg_loan_BA == MA_dual_loan_BA & MA_chg_loan_BA!=0 //treated are firms with dual holdings that are generated by MA only
	replace MAdummy = 0 if total_type==1 & dual_loan_BA4 ==0 //control are firms with MA but no dual holding
	
	psmatch2 MAdummy $control1, out(out1) logit 
	quietly reghdfe out1 MAdummy [fweight=_weight], cluster (sic2)
	est sto strict_nc
	quietly reghdfe out1 MAdummy $control1 [fweight=_weight], cluster (sic2)
	est sto strict_wc
	
	
	gen MAdummylight = .
	replace MAdummylight = 1 if holdertype==4 & MA_chg_loan_BA >0 & MA_chg_loan_BA!=. //treated are firms with dual holdings that are changed by MA 
	replace MAdummylight = 0 if total_type==1 // control are firms with MA but no dual holding
	
	psmatch2 MAdummylight $control1, out(out1) logit 
	quietly reghdfe out1 MAdummylight [fweight=_weight], cluster (sic2)
	est sto light_nc
	quietly reghdfe out1 MAdummylight $control1 [fweight=_weight], cluster (sic2)
	est sto light_wc
	
	
	esttab light_nc light_wc strict_nc strict_wc using "Table7A_MA.csv", replace label b(%9.3f) t(%9.2f) r2(%9.2f) mtitles("Baseline Treatment" "Baseline Treatment" "Restricted Treatment" "Restricted Treatment" ) modelwidth(6) star(* 0.10 ** 0.05 *** 0.01) 


*** Panel B : IV
*****************
	use merged_BA, clear

	merge 1:1 firm_id quar using "amihud.dta", keepusing(amihud4)
	la var amihud4 "Amihud"
	drop if _m==2
	drop _m
	

	
	quietly reghdfe dummy_le amihud4 $control1, a(${FEs}) vce(cl sic2)
	est sto firstols
	qui testparm*
	estadd scalar p_value = r(p)

	quietly probit dummy_le amihud4 $control1, vce(cl sic2)
	margins, dydx(*)
	est sto firstprobit
	qui testparm*
	estadd scalar p_value = r(p)

	esttab firstols firstprobit using"Table7b_IV_1stage.csv", replace star(* 0.1 ** 0.05 *** 0.01) b(%9.3f) t(%9.2f) r2(%9.2f) label scalar(F p_value)

	quietly ivregress 2sls out1 $control1 i.sic2 i.year (dummy_le=amihud4) , vce(cl sic2)
	est sto tsliq
				
	quietly biprobit (out1=dummy_le $control1 ) (dummy_le = amihud4 $control), vce(cl sic2)
	estpost margins, dydx(*) predict(pmarg1) force
	est sto biliq


	esttab tsliq biliq using "Table7B_IV.csv", replace label b(%9.3f) t(%9.2f) r2(%9.2f) pr2(%9.2f)  mtitles(2SLS BiProbit) modelwidth(6) star(* 0.10 ** 0.05 *** 0.01) drop(*year* *sic*)




********************************************************************************
*** Table 8 - Bond - Equity Dualholding
********************************************************************************

	use merged_BA, clear
	
	quietly reghdfe out1 dummy_be $control1, a(${FEs}) cluster (sic2)
	est sto be1

	quietly reghdfe out1 dummy_le dummy_be $control1, a(${FEs}) cluster (sic2)
	est sto be2
	lincom _b[dummy_le] - _b[dummy_be]


	egen hids = xtile(ds_score), nq(2)
	replace hids = hids - 1
	la var hids "High Distress"

	quietly reghdfe out1 dummy_be##hids $controlds, a(${FEs}) cluster (sic2)
	est sto be3

	quietly reghdfe out1 dummy_le##hids $controlds, a(${FEs}) cluster (sic2)
	est sto be4

	esttab be1 be2 be3 be4 using "Table8.csv", replace label b(%9.3f) t(%9.2f) r2(%9.2f) pr2(%9.2f) order(dummy_be dummy_le ds_score hids) modelwidth(6) star(* 0.10 ** 0.05 *** 0.01)


	
********************************************************************************
*** Table 9 - Post Resolution
********************************************************************************
use merged_BA, clear

merge 1:1 firm_id startquar using "post_resolution.dta"
drop if _m==2
drop _m

replace refile2=0 if refile2==.
replace refile3=0 if refile3==.


forval n=0/1{
		quietly reghdfe a_ret`n'  dummy_le $control1, a(${FEs}) cluster (sic2)
		est sto ret`n'
}

forval n=2/3{
	
	quietly reghdfe refile`n'  dummy_be $control1, a(${FEs}) cluster (sic2)
	est sto refile`n'
}
esttab ret0 ret1 refile2 refile3 using "Table9_Post.csv", replace label b(%9.3f) t(%9.2f) r2(%9.2f) modelwidth(6) mtitles("Same Quarter" "One Quarter" 2-year 3-year) star(* 0.10 ** 0.05 *** 0.01) 


********************************************************************************
*** APPENDICES
********************************************************************************


********************************************************************************
*** Table A5 - Self Recovery
********************************************************************************

use selfrecovery, clear

local comp_list = "asale size cash cflow tang rd rd_missing blev pension lease nol union_rate cds assetvol edf ds_score frac_loans"

estpost sum `comp_list' if recov==0   //Restructure
est sto A
estpost sum `comp_list' if recov==1   //Recover
est sto B
esttab A B using "TableA5_Selfrecovery.csv", replace cell("mean(fmt(%9.3f) label(Mean)) sd(fmt(%9.3f) label(SD))") mtitles ("Restructuring" "Restructuring" "Self Recovery" "Self Recovery") label 

*t-test
estpost ttest `comp_list', by(selfre)
est sto C
esttab C using "TableA5_ttest.csv", replace cell("b(fmt(%9.3f) label(Difference)) t(fmt(%9.2f) label(t-stat))") modelwidth(8) label wide




********************************************************************************
*** Table C1 - Self Recovery
********************************************************************************
use merged_BA, clear

estpost sum $control1 $control2 if dummy_le==1
est sto A
estpost sum $control1 $control2 if dummy_le==0
est sto B
esttab A B using "TableC1_comparison.csv", replace cells("mean(fmt(%9.3f) label(Mean)) sd(fmt(%9.3f) label(SD))") label 

*t-test
gen re_dummyle = 1-dummy_le
estpost ttest $control1 $control2, by(re_dummyle)
est sto tab2
esttab tab2 using "TableC1_ttest.csv", replace mtitle("Difference" "t-stat") modelwidth(5) label wide




********************************************************************************
*** Table C2 - Robustness
********************************************************************************

** Column 1: Total Absolute Dualholding Measure
************************************************
	use dualholding_TA, clear
	
	merge 1:1 firm_id quar using "basectrls.dta"
	drop if _m==2
	drop _m

	gen dummy_le = 1 if le_dual_loan_TA !=0 & total_loan!=0   //Loan-Equity Dummy
	replace dummy_le = 0 if le_dual_loan_TA ==0


	gen dintensity_le = le_dual_loan_TA/total_loan    // Debt intensity for Loan - Equity dual holdings
	replace dintensity_le=0 if dintensity_le==.
	gen cond_dintensity_le = le_dual_loan_TA/total_loan  // Conditional Debt intensity for Loan - Equity dual holdings


	gen eintensity_le = le_dual_equity_TA/total_equity  // Equity intensity for Loan - Equity dual holdings
	replace eintensity_le = 0 if eintensity_le ==.
	gen cond_eintensity_le = le_dual_equity_TA/total_equity // Conditional Equity intensity for Loan - Equity dual holdings


	gen combo_le = dintensity_le*eintensity_le  //Debt intensity x Equity intensity
	gen cond_combo_le = cond_dintensity_le*cond_eintensity_le  //Debt intensity x Equity intensity



	la var dummy_le "Dummy LE"
	la var cond_dintensity_le "Debt Intensity LE" 
	la var dintensity_le "Debt Intensity LE" 
	la var cond_eintensity_le "Equity Intensity LE"
	la var eintensity_le "Equity Intensity LE" 
	la var cond_combo_le "Combo Intensity LE"
	la var combo_le "Combo Intensity LE"

	quietly reghdfe out1 dummy_le $control1, a(${FEs}) cluster (sic2)   
	est sto rbst1
	
** Column 2: Out-of-court=1, Bankruptcy = 0, excluding private renegotiations 	
******************************************************************************
	use merged_BA, clear
	quietly reghdfe out2 dummy_le $control1, a(${FEs}) cluster (sic2)   
	est sto rbst2

** Column 3: Out-of-court=1, Prepack = 0, excluding other bankruptcies	
******************************************************************************
	quietly reghdfe out3 dummy_le $control1, a(${FEs}) cluster (sic2)   
	est sto rbst3

	esttab rbst1 rbst2 rbst3 using "TableC2_Robustness.csv", replace label b(%9.3f) t(%9.2f) r2(%9.2f) modelwidth(6) mtitles("Total Coverage" "Excluding Private" "Prepack") star(* 0.10 ** 0.05 *** 0.01)

	
	
	
********************************************************************************
*** Table C3 - Ordered Logit
********************************************************************************

	use merged_BA, clear

	foreach v in dummy_le eintensity_le{
		quietly ologit out4 `v' $control1, vce(cl sic2)
		est sto `v'1

		quietly ologit out4 `v' $control1 $control2, vce(cl sic2)
		est sto `v'2

		quietly ologit out4 `v' $control1 $control2 $control3, vce(cl sic2)
		est sto `v'3

	}


	esttab dummy_le1 dummy_le2 dummy_le3 eintensity_le1 eintensity_le2 eintensity_le3 using "TableC3_Ologit.csv", replace label b(%9.3f) t(%9.2f) r2(%9.2f) pr2(%9.2f) modelwidth(6) star(* 0.10 ** 0.05 *** 0.01)


********************************************************************************
*** Table C4 - Lead lender only
********************************************************************************
	use dualholding_BA_lead, clear
	
	merge 1:1 firm_id quar using "basectrls.dta"
	drop if _m==2
	drop _m

	gen dummy_le = 1 if le_dual_loan_BA !=0 & total_loan!=0   //Loan-Equity Dummy
	replace dummy_le = 0 if le_dual_loan_BA ==0


	gen dintensity_le = le_dual_loan_BA/total_loan    // Debt intensity for Loan - Equity dual holdings
	replace dintensity_le=0 if dintensity_le==.
	gen cond_dintensity_le = le_dual_loan_BA/total_loan  // Conditional Debt intensity for Loan - Equity dual holdings


	gen eintensity_le = le_dual_equity_BA/total_equity  // Equity intensity for Loan - Equity dual holdings
	replace eintensity_le = 0 if eintensity_le ==.
	gen cond_eintensity_le = le_dual_equity_BA/total_equity // Conditional Equity intensity for Loan - Equity dual holdings


	gen combo_le = dintensity_le*eintensity_le  //Debt intensity x Equity intensity
	gen cond_combo_le = cond_dintensity_le*cond_eintensity_le  //Debt intensity x Equity intensity



	la var dummy_le "Dummy LE"
	la var cond_dintensity_le "Debt Intensity LE" 
	la var dintensity_le "Debt Intensity LE" 
	la var cond_eintensity_le "Equity Intensity LE"
	la var eintensity_le "Equity Intensity LE" 
	la var cond_combo_le "Combo Intensity LE"
	la var combo_le "Combo Intensity LE"
	
	quietly reghdfe out1 dummy_le $control1, a(${FEs}) cluster (sic2)
	est sto ols1

	quietly reghdfe out1 dummy_le $control1 $control2, a(${FEs}) cluster (sic2)
	est sto ols2

	quietly reghdfe out1 dummy_le $control1 $control2 $control3, a(${FEs}) cluster (sic2)
	est sto ols3

	quietly probit out1 dummy_le $control1, vce(cl sic2)
	estpost margins, dydx(*)
	est sto probit1

	quietly probit out1 dummy_le $control1 $control2, vce(cl sic2)
	estpost margins, dydx(*)
	est sto probit2

	quietly probit out1 dummy_le $control1 $control2 $control3, vce(cl sic2)
	estpost margins, dydx(*)
	est sto probit3

	esttab ols1 ols2 ols3 probit1 probit2 probit3 using "TableC4_leadlender.csv", replace label b(%9.3f) t(%9.2f) r2(%9.2f) pr2(%9.2f) modelwidth(6) star(* 0.10 ** 0.05 *** 0.01) mtitles (OLS OLS OLS Probit Probit Probit)